$(function () {
    $("<div class='pagetz' ><span>跳页</span><div class='pageinner'><div class='pagecolse'></div><div class='fots'> <div class='bord'>共 <span>"+count+"</span>件商标 共 <span>"+pageCount+"</span>页</div> <div class='redi'><span>跳转到</span> <input type='number'><span>页</span></div></div><input type='button' id='btn' value='确定'></div></div>").appendTo('body');
        $('.pagetz').css({'width': '0.8rem','height': '0.8rem','border-radius': '50%','background': 'rgba(85, 85, 85, 0.9)','position': 'fixed','bottom': '3.2rem','right': '0.25rem','font-size': '0.28rem','color': '#eeeeee','line-height': '0.8rem','text-align': 'center'});
        $('.pagetz .pageinner').css({'width': '5rem','height': '3.32rem','background': 'rgba(0,0,0,0.9)','border-radius': '0.3rem','position': 'fixed','top':'0','left': '0','right': '0','bottom': '0','margin': 'auto','display': 'none'});
        $('.pageinner .fots').css({'width': '100%','height': '2.32rem','padding': '0 0.5rem','box-sizing': 'border-box'});
        $('.pageinner .fots .bord').css({'width': '100%','height': '1rem','border-bottom': '1px solid #fff','color': '#fff','font-size': '0.28rem','padding-top': '0.2rem','box-sizing': 'border-box'});
        $('.bord span').css({'color': '#ff524f'});
        $('.pageinner .fots .redi').css({'width': '100%','height': '1.5rem','line-height': '1.5rem'});
        $('.redi span').css({'font-size': '0.28rem','color': '#fff'});
        $('.redi input').css({'width': '1rem','background': '#fff','height': '40%','box-sizing': 'border-box','text-align': 'center','margin': '0 0.1rem','border-radius': '0.2rem','font-size': '0.32rem','color': '#ff7c26'});
        $('.pageinner input[type="button"]').css({'width': '50%','height': '0.6rem','background': '#ff7c26','text-align': 'center','line-height': '0.6rem','color': '#fff','border-radius': '0.2rem','font-size': '0.3rem'});
        $('.pageinner .pagecolse').css({'width': '0.8rem','height': '0.8rem','background': 'url(/images/_index1/close.png)no-repeat','background-size': '0.45rem 0.45rem','background-position': 'top right','position': 'absolute','top': '-0.12rem','right': '-0.12rem'});
        $('.pagetz').on('click',function () {
            $('.pageinner').fadeIn();
        });
        $('.pagetz .pageinner .pagecolse').on('click',function (event) {
            event.stopPropagation();
            $('.pageinner').fadeOut();
        });

    $('.redi input').on("input",function () {
        var str =  $.trim($('.redi input').val());
        var length = str.length;
        if (length > 5) {
            this.value = this.value.slice(0, 5)
        }
    });

    $(".pageinner #btn").on("touchend",function(){
        var  pages = $('.redi input').val();
        var regExp = /\d+/;
        if(regExp.test(page)){
			if(goPage.indexOf('-')>-1 && goPage.indexOf('sb')>-1){
				var am = goPage.split("?");
				if(am[0] && am[0]!=''){
					var arr = am[0].split("-");
					arr[19] = pages!='' ? parseInt(pages) : 1;
					var newarr = arr.join('-');
					location.replace(newarr);
				}else{
					location.replace(goPage+'page='+pages);
				}
			}else{
				location.replace(goPage+'page='+pages);
			}
        }else{
            alert("请输入合法的页码");
        }
    });

});




